/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.h.zapt

#pragma once

#include <app/ConcreteAttributePath.h>
#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/Nullable.h>
#include <app/util/basic-types.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Attributes.h>
#include <clusters/shared/Enums.h>
#include <clusters/shared/Structs.h>

#include <clusters/ElectricalPowerMeasurement/AttributeIds.h>
#include <clusters/ElectricalPowerMeasurement/ClusterId.h>
#include <clusters/ElectricalPowerMeasurement/Enums.h>
#include <clusters/ElectricalPowerMeasurement/Structs.h>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace ElectricalPowerMeasurement
		{
			namespace Attributes
			{

				namespace PowerMode
				{
					struct TypeInfo {
						using Type =
							chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;
						using DecodableType =
							chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;
						using DecodableArgType =
							chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::PowerMode::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace PowerMode
				namespace NumberOfMeasurementTypes
				{
					struct TypeInfo {
						using Type = uint8_t;
						using DecodableType = uint8_t;
						using DecodableArgType = uint8_t;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::NumberOfMeasurementTypes::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace NumberOfMeasurementTypes
				namespace Accuracy
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::List<
							const chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementAccuracyStruct::Type>;
						using DecodableType = chip::app::DataModel::DecodableList<
							chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementAccuracyStruct::DecodableType>;
						using DecodableArgType = const chip::app::DataModel::DecodableList<
							chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementAccuracyStruct::DecodableType> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::Accuracy::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace Accuracy
				namespace Ranges
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::List<
							const chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementRangeStruct::Type>;
						using DecodableType = chip::app::DataModel::DecodableList<
							chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementRangeStruct::DecodableType>;
						using DecodableArgType = const chip::app::DataModel::DecodableList<
							chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								MeasurementRangeStruct::DecodableType> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::Ranges::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace Ranges
				namespace Voltage
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::Voltage::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace Voltage
				namespace ActiveCurrent
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ActiveCurrent::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ActiveCurrent
				namespace ReactiveCurrent
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ReactiveCurrent::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ReactiveCurrent
				namespace ApparentCurrent
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ApparentCurrent::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ApparentCurrent
				namespace ActivePower
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ActivePower::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ActivePower
				namespace ReactivePower
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ReactivePower::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ReactivePower
				namespace ApparentPower
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::ApparentPower::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace ApparentPower
				namespace RMSVoltage
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::RMSVoltage::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace RMSVoltage
				namespace RMSCurrent
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::RMSCurrent::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace RMSCurrent
				namespace RMSPower
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::RMSPower::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace RMSPower
				namespace Frequency
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::Frequency::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace Frequency
				namespace HarmonicCurrents
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<chip::app::DataModel::List<
							const chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								HarmonicMeasurementStruct::Type>>;
						using DecodableType = chip::app::DataModel::Nullable<
							chip::app::DataModel::DecodableList<
								chip::app::Clusters::ElectricalPowerMeasurement::Structs::
									HarmonicMeasurementStruct::DecodableType>>;
						using DecodableArgType = const chip::app::DataModel::Nullable<
							chip::app::DataModel::DecodableList<
								chip::app::Clusters::ElectricalPowerMeasurement::Structs::
									HarmonicMeasurementStruct::DecodableType>> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::HarmonicCurrents::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace HarmonicCurrents
				namespace HarmonicPhases
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<chip::app::DataModel::List<
							const chip::app::Clusters::ElectricalPowerMeasurement::Structs::
								HarmonicMeasurementStruct::Type>>;
						using DecodableType = chip::app::DataModel::Nullable<
							chip::app::DataModel::DecodableList<
								chip::app::Clusters::ElectricalPowerMeasurement::Structs::
									HarmonicMeasurementStruct::DecodableType>>;
						using DecodableArgType = const chip::app::DataModel::Nullable<
							chip::app::DataModel::DecodableList<
								chip::app::Clusters::ElectricalPowerMeasurement::Structs::
									HarmonicMeasurementStruct::DecodableType>> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::HarmonicPhases::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace HarmonicPhases
				namespace PowerFactor
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::PowerFactor::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace PowerFactor
				namespace NeutralCurrent
				{
					struct TypeInfo {
						using Type = chip::app::DataModel::Nullable<int64_t>;
						using DecodableType = chip::app::DataModel::Nullable<int64_t>;
						using DecodableArgType =
							const chip::app::DataModel::Nullable<int64_t> &;

						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
						static constexpr AttributeId GetAttributeId()
						{
							return Attributes::NeutralCurrent::Id;
						}
						static constexpr bool MustUseTimedWrite() { return false; }
					};
				} // namespace NeutralCurrent
				namespace GeneratedCommandList
				{
					struct TypeInfo
						: public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
					};
				} // namespace GeneratedCommandList
				namespace AcceptedCommandList
				{
					struct TypeInfo
						: public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
					};
				} // namespace AcceptedCommandList
				namespace AttributeList
				{
					struct TypeInfo
						: public Clusters::Globals::Attributes::AttributeList::TypeInfo {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
					};
				} // namespace AttributeList
				namespace FeatureMap
				{
					struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
					};
				} // namespace FeatureMap
				namespace ClusterRevision
				{
					struct TypeInfo
						: public Clusters::Globals::Attributes::ClusterRevision::TypeInfo {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}
					};
				} // namespace ClusterRevision

				struct TypeInfo {
					struct DecodableType {
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::ElectricalPowerMeasurement::Id;
						}

						CHIP_ERROR Decode(TLV::TLVReader &reader,
								  const ConcreteAttributePath &path);

						Attributes::PowerMode::TypeInfo::DecodableType powerMode = static_cast<
							chip::app::Clusters::ElectricalPowerMeasurement::PowerModeEnum>(
							0);
						Attributes::NumberOfMeasurementTypes::TypeInfo::DecodableType
							numberOfMeasurementTypes = static_cast<uint8_t>(0);
						Attributes::Accuracy::TypeInfo::DecodableType accuracy;
						Attributes::Ranges::TypeInfo::DecodableType ranges;
						Attributes::Voltage::TypeInfo::DecodableType voltage;
						Attributes::ActiveCurrent::TypeInfo::DecodableType activeCurrent;
						Attributes::ReactiveCurrent::TypeInfo::DecodableType reactiveCurrent;
						Attributes::ApparentCurrent::TypeInfo::DecodableType apparentCurrent;
						Attributes::ActivePower::TypeInfo::DecodableType activePower;
						Attributes::ReactivePower::TypeInfo::DecodableType reactivePower;
						Attributes::ApparentPower::TypeInfo::DecodableType apparentPower;
						Attributes::RMSVoltage::TypeInfo::DecodableType RMSVoltage;
						Attributes::RMSCurrent::TypeInfo::DecodableType RMSCurrent;
						Attributes::RMSPower::TypeInfo::DecodableType RMSPower;
						Attributes::Frequency::TypeInfo::DecodableType frequency;
						Attributes::HarmonicCurrents::TypeInfo::DecodableType harmonicCurrents;
						Attributes::HarmonicPhases::TypeInfo::DecodableType harmonicPhases;
						Attributes::PowerFactor::TypeInfo::DecodableType powerFactor;
						Attributes::NeutralCurrent::TypeInfo::DecodableType neutralCurrent;
						Attributes::GeneratedCommandList::TypeInfo::DecodableType
							generatedCommandList;
						Attributes::AcceptedCommandList::TypeInfo::DecodableType
							acceptedCommandList;
						Attributes::AttributeList::TypeInfo::DecodableType attributeList;
						Attributes::FeatureMap::TypeInfo::DecodableType featureMap =
							static_cast<uint32_t>(0);
						Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision =
							static_cast<uint16_t>(0);
					};
				};
			} // namespace Attributes
		} // namespace ElectricalPowerMeasurement
	} // namespace Clusters
} // namespace app
} // namespace chip
